facedetect = [{'faceId': '4a067dae-f895-4457-a753-9c316b411f8e',
  'faceRectangle': {'top': 80, 'left': 98, 'width': 57, 'height': 57},
  'faceAttributes': {'smile': 0.682,
   'headPose': {'pitch': -10.5, 'roll': 13.0, 'yaw': 9.6},
   'gender': 'female',
   'age': 22.0,
   'facialHair': {'moustache': 0.0, 'beard': 0.0, 'sideburns': 0.0},
   'glasses': 'NoGlasses',
   'emotion': {'anger': 0.0,
    'contempt': 0.001,
    'disgust': 0.0,
    'fear': 0.0,
    'happiness': 0.682,
    'neutral': 0.316,
    'sadness': 0.0,
    'surprise': 0.0},
   'blur': {'blurLevel': 'low', 'value': 0.0},
   'exposure': {'exposureLevel': 'goodExposure', 'value': 0.52},
   'noise': {'noiseLevel': 'medium', 'value': 0.67},
   'makeup': {'eyeMakeup': True, 'lipMakeup': True},
   'accessories': [],
   'occlusion': {'foreheadOccluded': False,
    'eyeOccluded': False,
    'mouthOccluded': False},
   'hair': {'bald': 0.09,
    'invisible': False,
    'hairColor': [{'color': 'black', 'confidence': 1.0},
     {'color': 'other', 'confidence': 0.77},
     {'color': 'gray', 'confidence': 0.51},
     {'color': 'brown', 'confidence': 0.27},
     {'color': 'blond', 'confidence': 0.03},
     {'color': 'red', 'confidence': 0.02},
     {'color': 'white', 'confidence': 0.0}]}}},
 {'faceId': '6dce054d-7132-41ca-827d-8dbade62da42',
  'faceRectangle': {'top': 80, 'left': 332, 'width': 57, 'height': 57},
  'faceAttributes': {'smile': 0.713,
   'headPose': {'pitch': -6.2, 'roll': 7.7, 'yaw': 21.7},
   'gender': 'female',
   'age': 23.0,
   'facialHair': {'moustache': 0.0, 'beard': 0.0, 'sideburns': 0.0},
   'glasses': 'NoGlasses',
   'emotion': {'anger': 0.0,
    'contempt': 0.005,
    'disgust': 0.0,
    'fear': 0.0,
    'happiness': 0.713,
    'neutral': 0.282,
    'sadness': 0.0,
    'surprise': 0.0},
   'blur': {'blurLevel': 'low', 'value': 0.0},
   'exposure': {'exposureLevel': 'goodExposure', 'value': 0.74},
   'noise': {'noiseLevel': 'high', 'value': 1.0},
   'makeup': {'eyeMakeup': True, 'lipMakeup': True},
   'accessories': [],
   'occlusion': {'foreheadOccluded': False,
    'eyeOccluded': False,
    'mouthOccluded': False},
   'hair': {'bald': 0.13,
    'invisible': False,
    'hairColor': [{'color': 'black', 'confidence': 1.0},
     {'color': 'other', 'confidence': 0.66},
     {'color': 'brown', 'confidence': 0.45},
     {'color': 'gray', 'confidence': 0.39},
     {'color': 'blond', 'confidence': 0.07},
     {'color': 'red', 'confidence': 0.03},
     {'color': 'white', 'confidence': 0.0}]}}},
 {'faceId': '04246f0e-1a89-44c4-983f-ec6ce3dc84fe',
  'faceRectangle': {'top': 97, 'left': 202, 'width': 54, 'height': 54},
  'faceAttributes': {'smile': 1.0,
   'headPose': {'pitch': -13.0, 'roll': -2.3, 'yaw': 2.3},
   'gender': 'female',
   'age': 23.0,
   'facialHair': {'moustache': 0.0, 'beard': 0.0, 'sideburns': 0.0},
   'glasses': 'NoGlasses',
   'emotion': {'anger': 0.0,
    'contempt': 0.0,
    'disgust': 0.0,
    'fear': 0.0,
    'happiness': 1.0,
    'neutral': 0.0,
    'sadness': 0.0,
    'surprise': 0.0},
   'blur': {'blurLevel': 'low', 'value': 0.0},
   'exposure': {'exposureLevel': 'goodExposure', 'value': 0.47},
   'noise': {'noiseLevel': 'high', 'value': 1.0},
   'makeup': {'eyeMakeup': True, 'lipMakeup': True},
   'accessories': [],
   'occlusion': {'foreheadOccluded': False,
    'eyeOccluded': False,
    'mouthOccluded': False},
   'hair': {'bald': 0.04,
    'invisible': False,
    'hairColor': [{'color': 'black', 'confidence': 0.99},
     {'color': 'other', 'confidence': 0.9},
     {'color': 'gray', 'confidence': 0.5},
     {'color': 'brown', 'confidence': 0.19},
     {'color': 'red', 'confidence': 0.15},
     {'color': 'blond', 'confidence': 0.02},
     {'color': 'white', 'confidence': 0.0}]}}}]

age = []
glasses = []
smile = []
hair_color = []
gender = []

age.append(facedetect[0]['faceAttributes']['age'])
age.append(facedetect[1]['faceAttributes']['age'])
age.append(facedetect[2]['faceAttributes']['age'])
print(age)

glasses.append(facedetect[0]['faceAttributes']['glasses'])
glasses.append(facedetect[1]['faceAttributes']['glasses'])
glasses.append(facedetect[2]['faceAttributes']['glasses'])
print(glasses)

smile.append(facedetect[0]['faceAttributes']['smile'])
smile.append(facedetect[1]['faceAttributes']['smile'])
smile.append(facedetect[2]['faceAttributes']['smile'])
print(smile)

hair_color.append(facedetect[0]['faceAttributes']['hair']['hairColor'][0]['color'])
hair_color.append(facedetect[1]['faceAttributes']['hair']['hairColor'][0]['color'])
hair_color.append(facedetect[2]['faceAttributes']['hair']['hairColor'][0]['color'])
print(hair_color)

gender.append(facedetect[0]['faceAttributes']['gender'])
gender.append(facedetect[1]['faceAttributes']['gender'])
gender.append(facedetect[2]['faceAttributes']['gender'])
print(gender)
